<template>
  <div class="collectionlist">
    <div class="image" v-for="(item, index) in subscribers" :key="index">
      <img :src="item.avatarUrl" alt="" />
      <p>{{ item.nickname }}</p>
    </div>
  </div>
</template>

<script>
import { getplaylissubscribers } from "@/api/playlist.js";
export default {
  name: "CollectionList",
  components: {},
  props: {},
  data() {
    return {
      subscribers: ""
    };
  },
  computed: {},
  watch: {},
  created() {
    this.getplaylissubscribers();
  },
  mounted() {},
  methods: {
    async getplaylissubscribers() {
      const data = await getplaylissubscribers({
        id: this.$route.query.id,
        limit: 30
      });
      this.subscribers = data.data.subscribers;
    }
  }
};
</script>

<style scoped lang="scss">
.collectionlist {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  font-size: 0.875rem;
  margin-bottom: 5rem;

  .image {
    width: 10%;
    text-align: center;
    box-sizing: border-box;
    // padding: 1.25rem;
    padding: 1.25rem 0;
    img {
      width: 60%;
      border-radius: 50%;
    }
    p {
      text-align: center;
    }
  }
}
</style>
